package cn.edu.sgu.www.mhxysy.service.except.impl;

import cn.edu.sgu.www.mhxysy.entity.except.Phyle;
import cn.edu.sgu.www.mhxysy.redis.repository.impl.PhyleRepository;
import cn.edu.sgu.www.mhxysy.service.except.PhyleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class PhyleServiceImpl implements PhyleService {

    private final PhyleRepository phyleRepository;

    @Autowired
    public PhyleServiceImpl(PhyleRepository phyleRepository) {
        this.phyleRepository = phyleRepository;
    }

    @Override
    public List<Phyle> selectAll() {
        return phyleRepository.selectList();
    }

    @Override
    public Phyle selectById(Integer id) {
        return phyleRepository.selectById(id.toString());
    }

}